import mediarequest from '@/utils/media-request'

/************ 人物相关接口开始 *******************/
export function getPersons(data) {
  return mediarequest({
    url: '/console/constant/persons',
    method: 'get',
    params: data
  })
}

export function createPerson(data) {
  return mediarequest({
    url: '/console/constant/person',
    method: 'post',
    data
  })
}

export function updatePerson(data) {
  return mediarequest({
    url: '/console/constant/person',
    method: 'put',
    data
  })
}

export function deletePerson(data) {
  return mediarequest({
    url: '/console/constant/person',
    method: 'delete',
    data
  })
}
/************ 人物相关接口结束 *******************/

/************ 地区相关接口开始 *******************/
export function getAreas(data) {
  return mediarequest({
    url: '/console/constant/areas',
    method: 'get',
    params: data
  })
}

export function createArea(data) {
  return mediarequest({
    url: '/console/constant/area',
    method: 'post',
    data
  })
}

export function UpdateArea(data) {
  return mediarequest({
    url: '/console/constant/area',
    method: 'put',
    data
  })
}

export function deleteArea(data) {
  return mediarequest({
    url: '/console/constant/area',
    method: 'delete',
    data
  })
}
/************ 地区相关接口结束 *******************/

/************ 语言相关接口开始 *******************/
export function getLanguages(data) {
  return mediarequest({
    url: '/console/constant/languages',
    method: 'get',
    params: data
  })
}

export function createLanguage(data) {
  return mediarequest({
    url: '/console/constant/language',
    method: 'post',
    data
  })
}

export function updateLanguage(data) {
  return mediarequest({
    url: '/console/constant/language',
    method: 'put',
    data
  })
}

export function deleteLanguage(data) {
  return mediarequest({
    url: '/console/constant/language',
    method: 'delete',
    data
  })
}
/************ 语言相关接口结束 *******************/

/************ 一级分类相关接口开始 *******************/
export function getCategories(data) {
  return mediarequest({
    url: '/console/constant/categorys',
    method: 'get',
    params: data
  })
}
export function createCategory(data) {
  return mediarequest({
    url: '/console/constant/category',
    method: 'post',
    data
  })
}

export function updateCategory(data) {
  return mediarequest({
    url: '/console/constant/category',
    method: 'put',
    data
  })
}

export function deleteCategory(data) {
  return mediarequest({
    url: '/console/constant/category',
    method: 'delete',
    data
  })
}
/************ 一级分类相关接口结束 *******************/

/************ 二级分类相关接口开始 *******************/
export function getSubCategories(data) {
  return mediarequest({
    url: '/console/constant/category/subcategorys',
    method: 'get',
    params: data
  })
}

export function createSubcategory(data) {
  return mediarequest({
    url: '/console/constant/subcategory',
    method: 'post',
    data
  })
}

export function updateSubCategory(data) {
  return mediarequest({
    url: '/console/constant/subcategory',
    method: 'put',
    data
  })
}

export function deleteSubCategory(data) {
  return mediarequest({
    url: '/console/constant/subcategory',
    method: 'delete',
    data
  })
}
/************ 二级分类相关接口结束 *******************/

/************ 标签相关接口开始 *******************/
export function getTags(data) {
  return mediarequest({
    url: '/console/constant/tags',
    method: 'get',
    params: data
  })
}

export function createTag(data) {
  return mediarequest({
    url: '/console/constant/tag',
    method: 'post',
    data
  })
}

export function updateTag(data) {
  return mediarequest({
    url: '/console/constant/tag',
    method: 'put',
    data
  })
}

export function deleteTag(data) {
  return mediarequest({
    url: '/console/constant/tag',
    method: 'delete',
    data
  })
}
/************ 标签相关接口结束 *******************/
